ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Struts 2 Basics
What is Framework ? Set of classes and interfaces that co-operate to solve a specific problem.  Tries to make generalizations about the common tasks and work flow of a specific domain.  Automates common tasks.  Provide architectural solution.
Why to Use Framework ? Make the HUGE web application development easy.  Saves time of developers because it automates all tedious tasks of development.  Provides a platform upon which applications can be more quickly build.
What is Struts 2 ? A brand-new web application framework. Based on OpenSymphony  Web Works Framework  . Follows well established MVC (Model-View-Controller) design pattern.  Also Known as WebWorks2.
Whats in Struts 2 ? MVC is implemented by action, result and FilterDispatcher. Controller is  FilterDispatcher  , Model is  Action  and View is  Result    Controller(FilterDispatcher) is responsible for mapping users requests to appropriate action.  Invocation of action should pass through a series of  interceptors  as defined in the application's XML file  Model(Action) contains DATA and business logic.  View is implemented using  JSP  ,  Velocity Template  ,  Freemaker  etc.
How Struts 2 Works ?
Whats in Struts 2 ? Struts 2 uses two mechanisms for declaring architecture.  XML – Based declarative architecture. JAVA – Annotations Based Declarative architecture
XML Based Declarative Architecture XML Documents consist of elements that represent the components of the application. Mainly contains  struts.xml  as entry point
Java Annotations Based Declarative Architecture Annotations allows you to add meta-data directly to JAVA source files.  Made on the Java classes that implement the actions.  They contain meta-data that the framework uses to create the runtime components of your application.
Done! Click the  icon at the bottom to proceed!

More Related Content

Krazykoder struts2 intro

  • 2. What is Framework ? Set of classes and interfaces that co-operate to solve a specific problem. Tries to make generalizations about the common tasks and work flow of a specific domain. Automates common tasks. Provide architectural solution.
  • 3. Why to Use Framework ? Make the HUGE web application development easy. Saves time of developers because it automates all tedious tasks of development. Provides a platform upon which applications can be more quickly build.
  • 4. What is Struts 2 ? A brand-new web application framework. Based on OpenSymphony Web Works Framework . Follows well established MVC (Model-View-Controller) design pattern. Also Known as WebWorks2.
  • 5. Whats in Struts 2 ? MVC is implemented by action, result and FilterDispatcher. Controller is FilterDispatcher , Model is Action and View is Result Controller(FilterDispatcher) is responsible for mapping users requests to appropriate action. Invocation of action should pass through a series of interceptors as defined in the application's XML file Model(Action) contains DATA and business logic. View is implemented using JSP , Velocity Template , Freemaker etc.
  • 6. How Struts 2 Works ?
  • 7. Whats in Struts 2 ? Struts 2 uses two mechanisms for declaring architecture. XML – Based declarative architecture. JAVA – Annotations Based Declarative architecture
  • 8. XML Based Declarative Architecture XML Documents consist of elements that represent the components of the application. Mainly contains struts.xml as entry point
  • 9. Java Annotations Based Declarative Architecture Annotations allows you to add meta-data directly to JAVA source files. Made on the Java classes that implement the actions. They contain meta-data that the framework uses to create the runtime components of your application.
  • 10. Done! Click the icon at the bottom to proceed!